<?php

class FormRefill extends AppModel
{
	public $name = 'FormRefill';
	public $useTable = false;

	public $validate = array(
        'bill' => array(
            'create_first' => array(
                'on' => 'create',
                'required' => true,
                'allowEmpty' => false,
                'message' => 'required',
            ),
            'update_first' => array(
                'on' => 'update',
                'required' => false,
                'allowEmpty' => false,
                'message' => 'required',
            ),
            'second' => array(
                'rule' => array('maxLength', 50),
                'message' => 'too long',
            ),
        ),
        'amount' => array(
            'create_first' => array(
                'on' => 'create',
                'required' => true,
                'allowEmpty' => false,
                'message' => 'required',
            ),
            'update_first' => array(
                'on' => 'update',
                'required' => false,
                'allowEmpty' => false,
                'message' => 'required',
            ),
            'second' => array(
                'rule' => array('customEreg', '^[0-9]+$'),
                'message' => 'amount',
            ),
        ),
        'comment' => null,
    );

}

?>